AI Verified

Name

Remove admin nags

About

Custom function to remove admin notices (remember to edit the classes)

Language

PHP

Rating

Voted: 2 by 2 user(s)

Link for further information:

The author has provided the following URL that may be helpful to setting up or using this snippet:

https://www.youtube.com/watch?v=FTznZjw26X8

Codevault

Totalweb AS

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: Not Specified

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

22/05/2023

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Remove admin nags

 
                    
1function remove_admin_nags() {
2 echo '<style> .wp-core-ui .notice.is-dismissible { display: none!important; } </style>';
3}
4 
5add_action('admin_head', 'remove_admin_nags');

2

Related Snippets

Please see some snippets below related to this snippet..

WordPress Admin

AI Verified

0

Redirect user role on specific page

Added: 1 year ago

Last Updated: 1 year ago

This code will redirect a specific page based on the user role NOT being met.

WordPress Admin

AI Verified

0

Stay Logged In for 1 Year

Added: 9 months ago

Last Updated: 9 months ago

<p><a href="https://digwp.com/2023/01/stay-logged-in-to-wordpress/#:~:text=of%20custom%20code..-,Add%20custom%20code,-For%20more%20flexibility" target="_blank" rel="noopener">Stay Logged in to WordPre...

WordPress Admin

AI Verified

1

Create new image sizes in WordPress

Added: 1 year ago

Last Updated: 1 year ago

If you want to create new image sizes, this is the code snippet you've been looking for. Can be really useful for, for example, creating consistently non-sqare sized product images in WooCommerce.

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

AI Verified

3

Remove the site health dashboard widget

Added: 1 year ago

Last Updated: 1 day ago

WordPress Admin

AI Verified

2

Remove admin nags

Added: 1 year ago

Last Updated: 1 year ago

Custom function to remove admin notices (remember to edit the classes)

WooCommerce

AI Verified

1

Woocommerce - Remove the additional information tab

Added: 1 year ago

Last Updated: 1 day ago